﻿/*
*	冰火家族萬能NPC
*
*
*
*
*
*/
var x = "#fEffect/CharacterEff/1112949/0/0#";//高音譜記號
var kk = "#fEffect/BasicEff/MainNotice/Boss/Default/0#";//BOSS
var c = "#fEffect/CharacterEff/1032063/0/0#";//"#fUI/UIMiniGame/starPlanetRPS/heart#";//愛心
var cmark = "#fUI/UIPVP/ChampionMark/1#";//愛心
var lb = "#fEffect/ItemEff/1112811/0/0#";//藍色小光
var b = "#fEffect/CharacterEff/Shaman/1#";//超萌熊熊
var cat = "#fEffect/CharacterEff/Shaman/4#";//超萌喵咪
var leaf = "#fUI/Basic.img/Cursor/18/0#";
var status;

var menuList = Array(
        Array(lb, "城鎮傳送", 0, true),
		Array(lb, "練功地圖", 1, true),
		Array(lb, "組隊任務", 2, true),
		Array(lb, "遠征挑戰", 3, true),
		Array(lb, "忍耐地圖", 4, true),
		Array(lb, "#b美洲豹圖#d", 5, true),
		Array(lb, "#r轉蛋地圖", 6, true)
		);
function start() {
    status = -1;
    action(1, 0, 0);
}

function action(mode, type, selection) {

    if (mode == 0) {
	cm.dispose();
	return;
    } else if (mode == 1){
	status++;
    } else {
	status--;
    }

    switch (status) {
        case 0: 
			text = "\t  "+c+"#fn华文行楷##fs30##e#k #b地圖傳送 " +c+ "\r\n#fs12##fn宋体#";
			
			var ccc = 0;
			for (var i = 0; i < menuList.length; i++) {
				if(ccc%3 == 0)
					text +="\r\n   ";
				if (menuList[i][3]) { // 如果允许显示
					text += "#d#L" + menuList[i][2] + "#" + menuList[i][0] + menuList[i][1] + "#l";
					ccc++;
				}
			}
			text += "\r\n\r\n\t\t   #L999#" + leaf +"#fn华文行楷##fs22##e#r回上一頁#l"
			text += "\r\n\r\n  " +c+c+c+c+c+c;
			cm.sendSimple(text);
            break;
        case 1: //
			switch (selection){
				case 0://城鎮傳送
					cm.dispose();
					cm.openNpc(9201116,"Tele_Town");
					break;
				case 1://練功地圖
					cm.dispose();
					cm.openNpc(9201116,"Tele_Train");
					break;
				case 2://組隊副本
					cm.dispose();
					cm.warp(910002000);
					break;
				case 3://BOSS遠征挑戰
					cm.dispose();
					cm.openNpc(9201116,"Tele_BOSS");
					break;
				case 4://忍耐任務
					cm.dispose();
					cm.openNpc(9201116,"Tele_Jump");
					break;
				case 5://美洲豹圖
					cm.dispose();
					cm.openNpc(2151008);
					break;
				case 6://轉蛋地圖
					cm.dispose();
					cm.warp(749050400);
					break;
				case 999://回上一頁
					cm.dispose();
					cm.openNpc(1052253);
					break;
			}
            break;
        default:
			cm.sendOk("發生錯誤，請聯繫管理員!");
			cm.dispose();
			break;
    }
}
